% Script that fetches all filter functions into local workspace
function sffuncs=spyview_listfilt(spyviewdir)
if ~exist('spyviewdir','var') || isempty(spyviewdir)
    spyviewdir=fileparts(which('spyview'));
end
sffiles=dir(sprintf('%s/filters/spyfilt*.m',spyviewdir));
sffiles={sffiles.name};
sfnames=regexp(sffiles,'(.*)\.m','tokens');
for j=1:2
    for i=1:length(sfnames)
        if iscell(sfnames{i})
            sfnames{i}=sfnames{i}{end};
        end
    end
end
for i=1:length(sfnames)
    sffuncs{i}=str2func(sfnames{i});
end
end